package com.example.gulimall.cas.api;

import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * <p>@description:   </p>
 * <p>@author: JGD </p>
 * <p>@create: 2020/3/11 0:11 </p>
 * <p>@version : 2.0.0
 **/
@RestController
@RequestMapping("user")
public class UserApi {
    @Resource
    private UserDetailsService userDetailsService;
    @PostMapping("login")
    public String login(String username){
        userDetailsService.loadUserByUsername(username);
        return "登录成功";
    }
}
